Networks typically include switches, routers, and similar network devices, whose function is to direct network traffic from one part of a network to another. As part of this function, these network devices may modify a network packet. For example, in some cases, a network device for routing or switching may modify a packet header in the course of directing the packet to its destination. For example, the network device may modify a destination or source address, a source or destination port, or a time-to-live field, and any of these changes may require updating a header checksum field. Network devices may include hardware and/or software for modifying a packet.